/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "identifiedby")
@NamedQueries({
    @NamedQuery(name = "Identifiedby.findAll", query = "SELECT i FROM Identifiedby i"),
    @NamedQuery(name = "Identifiedby.findByIdidentifiedby", query = "SELECT i FROM Identifiedby i WHERE i.ididentifiedby = :ididentifiedby"),
    @NamedQuery(name = "Identifiedby.findByIdentifiedby", query = "SELECT i FROM Identifiedby i WHERE i.identifiedby = :identifiedby")})
public class Identifiedby implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ididentifiedby")
    private Integer ididentifiedby;
    @Column(name = "identifiedby")
    private String identifiedby;
    @ManyToMany(mappedBy = "identifiedbyList", fetch = FetchType.LAZY)
    private List<Identificationelement> identificationelementList;
    @ManyToMany(mappedBy = "identifiedbyList", fetch = FetchType.LAZY)
    private List<Curatorialelement> curatorialelementList;

    public Identifiedby() {
    }

    public Identifiedby(Integer ididentifiedby) {
        this.ididentifiedby = ididentifiedby;
    }

    public Integer getIdidentifiedby() {
        return ididentifiedby;
    }

    public void setIdidentifiedby(Integer ididentifiedby) {
        this.ididentifiedby = ididentifiedby;
    }

    public String getIdentifiedby() {
        return identifiedby;
    }

    public void setIdentifiedby(String identifiedby) {
        this.identifiedby = identifiedby;
    }

    public List<Identificationelement> getIdentificationelementList() {
        return identificationelementList;
    }

    public void setIdentificationelementList(List<Identificationelement> identificationelementList) {
        this.identificationelementList = identificationelementList;
    }

    public List<Curatorialelement> getCuratorialelementList() {
        return curatorialelementList;
    }

    public void setCuratorialelementList(List<Curatorialelement> curatorialelementList) {
        this.curatorialelementList = curatorialelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ididentifiedby != null ? ididentifiedby.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Identifiedby)) {
            return false;
        }
        Identifiedby other = (Identifiedby) object;
        if ((this.ididentifiedby == null && other.ididentifiedby != null) || (this.ididentifiedby != null && !this.ididentifiedby.equals(other.ididentifiedby))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Identifiedby[ididentifiedby=" + ididentifiedby + "]";
    }

}
